package com.xiandou.service;


import com.xiandou.model.Demo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author rocpeng
 *
 * todo : 无法将回退类注入到 feign 项目中
 *
 */
@FeignClient(name = "server-provider")
public interface DemoService {

    /**
     * 获取用户
     *
     * @param id
     * @return
     * @throws Exception
     */
    @RequestMapping("/demo-server/{id}")
    Demo getUser(@PathVariable("id") Long id) throws Exception;
}





